JavaScript Syntax Check

The "Syntax Check" deploy setting (in the "Engine Settings" section) allows your JavaScript code to be checked for validity when you deploy your application. XpertRule utilises the JSHint JavaScript checker.

JSHint can be configured to report not just invalid JavaScript but also code which breaks various JavaScript conventions. If you would like to enforce more syntactical checks on your code, you can do this by manually editing the jsHint/index.html file which can be found in the XpertRule install folder. Documentation for the numerous options can be read here.

By default, JavaScript procedures are syntax checked at both edit and deploy time. Along side the global syntax check (set from deploy options), you can turn checking on & off within your individual JavaScript by using the following syntax...

Don't check a block of code...

/* jshint ignore:start */
myGlobalObject.showDebug("Hello World!");
/* jshint ignore:end */

Don't check a single line...

myGlobalObject.showDebug("Hello World!"); // jshint ignore:line

Alternatively, you can specify any global object which you might use with the following comment at the start of your javaScript procedure...

/* global myGlobalObject */

For more information, see the "Directives" section on the following page...

http://www.jshint.com/docs/